/* 
 * File:   ParametersCommand.cpp
 * Author: Gab'z
 * 
 * Created on 5 juin 2012, 10:58
 */

#include "ParametersCommand.h"
#include "../../Context.h"
#include "exception/MementoException.h"
#include "model/memento/ParametersMemento.h"

namespace calculator {
    Logger* ParametersCommand::log = LoggerManager::getInstance()->getLogger("ParametersCommand");

    ParametersCommand::ParametersCommand(const std::string name) : UndoableRedoableCommand(name) {
    }
    
    ParametersCommand::~ParametersCommand() {
    }

    std::string ParametersCommand::isExecutable() const {
        return "";
    }

    void ParametersCommand::execute() const throw (CommandException) {
        log->trace("executing Command");
        apply(Context::getInstance()->getParameters());
    }
}
